A Efficient Hosted Interpreters on the JVM

نویسندگان

  • GÜLFEM SAVRUN-YENİÇERİ
  • WEI ZHANG
  • HUAHAN ZHANG
  • ERIC SECKLER
  • CHEN LI
  • STEFAN BRUNTHALER
  • MICHAEL FRANZ
چکیده

Many guest languages are implemented using the Java Virtual Machine as a host environment. There are two major implementation choices: custom compilers and so-called hosted interpreters. Custom compilers are complex to build but offer good performance. Hosted interpreters are comparatively simpler to implement but until now have suffered from poor performance. We studied the performance of hosted interpreters and identified common bottlenecks preventing their efficient execution. First, similar to interpreters written in C/C++, instruction dispatch is expensive on the JVM. Second, Java’s semantics require expensive runtime exception checks that negatively affect array performance essential to interpreters. We present two optimizations targeting these bottlenecks and show that the performance of optimized interpreters increases dramatically: we report speedups by a factor of up to 2.45 over the Jython interpreter, 3.57 over the Rhino interpreter, and 2.52 over the JRuby interpreter, respectively. The resulting performance is comparable with that of custom compilers. Our optimizations are enabled by a few simple annotations that require only modest implementation effort; in return, performance increases substantially.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Opportunities for a Truffle-based Golo Interpreter

Golo is a simple dynamically-typed language for the Java Virtual Machine. Initially implemented as a ahead-of-time compiler to JVM bytecode, it leverages invokedynamic and JSR 292 method handles to implement a reasonably efficient runtime. Truffle is emerging as a framework for building interpreters for JVM languages with self-specializing AST nodes. Combined with the Graal compiler, Truffle of...

متن کامل

Implementing an E cient Java

The Java virtual machine (JVM) is usually implemented with an interpreter or just-in-time (JIT) compiler. JIT compilers provide the best performance, but must be substantially rewritten for each architecture they are ported to. Interpreters are easier to develop and maintain, and can be ported to new architectures with almost no changes. The weakness of interpreters is that they are much slower...

متن کامل

Implementing an Eecient Java Interpreter

The Java virtual machine (JVM) is usually implemented with an interpreter or just-in-time (JIT) compiler. JIT compilers provide the best performance, but must be substantially rewritten for each architecture they are ported to. Interpreters are easier to develop and maintain, and can be ported to new architectures with almost no changes. The weakness of interpreters is that they are much slower...

متن کامل

A Fast Java Interpreter

The Java virtual machine (JVM) is usually implemented with an interpreter or just-in-time (JIT) compiler. JITs provide the best performance, but must be substantially rewritten for each architecture they are ported to. Interpreters are easier to develop and maintain, need less memory and can be ported to new architectures with almost no changes. The weakness of interpreters is that they are muc...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014